from functools import lru_cache
def test(maxsize=128, hello=False):
    print('start')
    print(maxsize)
    if callable(maxsize) and isinstance(hello, bool):
        return maxsize
    def inner(user_function):
        return user_function
    return inner


def test2(func=None):
    print('start2', func)
#     如果是@test2()调用 那么会报错test2() missing 1 required positional argument: 'func' 需要给func一个默认值
    if callable(func):
        return func
    def inner(user_function):
        return user_function
    return inner
#
# @test()
# def aaa():
#     print('sadsd')

@test2
def testsss():
    print('sdsdsd')

# aaa()
testsss()